package com.lsu.app.mapper;

import com.lsu.app.bean.Schedule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 *
 * @description 针对表【schedule(课程表)】的数据库操作Mapper
 * @Date 2023-11-07 18:42:41
 * @author hjj
 */
@Mapper
public interface ScheduleMapper extends BaseMapper<Schedule> {
    @Select("select id from schedule where user_id=#{userId} and state=1")
    Integer getIdByUserId(Integer userId);
    @Select("select COUNT(*) from schedule where user_id=#{userId} and name=#{name}")
    Integer existSchWithName(@Param("userId") Integer userId, @Param("name") String name);
}




